<section class="menu_category">
<?php if (0 >= count($rubrics)):?>
  <p><?php echo Yii::t('app', 'Рубрики не найдены');?></p>
<?php else:?>
  <h3 class="name_menu_category"><?php echo Controller::getServiceType($service_type)?></h3>
  <ul class="container_menu_category">
  <?php foreach($rubrics as $rubric):?>
  <?php if (0 >= $rubric['quantity']) continue;?>
    <li class="group_menu_category">
      <span class="name_group_menu_category">
        <!-- <a href="<?php echo Yii::app()->createUrl('/rubrics/single', array('st_id' => $service_type,'rid'=>$rubric['id']));?>"> -->
        <?php echo GxHtml::encode($rubric['name']);?>
        <!-- </a> -->
      </span>
      <?php if(isset($rubric['categories']) && 0 < count($rubric['categories'])):?>
        <ul  class="subgroup_menu_category">
				<?php foreach($rubric['categories'] as $category):?>
				<?php if (0 >= $category['quantity']) continue;?>
        <?php $current_category = ($category_id == $category['id']) ? ' class="active_menu_category_item" ' : '';?>
          <li class="item_menu_category">
            <a href="<?php echo Yii::app()->createUrl('/category', array('st_id' => $service_type,'rid'=>$rubric['id'], 'cid'=>$category['id']));?>" <?php echo $current_category;?>>
              <span><?php echo GxHtml::encode($category['name']);?></span>
            </a>
          </li>        
        <?php endforeach;?>
        </ul>
      <?php endif;?>
    </li>  
	<?php endforeach;?>  
  </ul>
<?php endif;?>
</section>